<?php
namespace ITSociaal\Themes\HuisVanHerstel\Traits;

/**
 * Wraps the new operator
 *
 * Because operator invocations can't be tested with PHPUnit
 */
trait CreateObject
{
	/**
	 * Invokes the new operator for you :)
	 *
	 * @param string $class
	 *
	 * @return object
	 */
	protected function createObject($class, ...$args)
	{
		return new $class(...$args);
	}
}

/* vi:set ts=4 sw=4 noet: */
